package com.lineage.server.serverpackets;

public class S_CharSynAck extends ServerBasePacket {
  private byte[] _byte;
  
  public static final int SYN = 10;
  
  public static final int ACK = 64;
  
  public S_CharSynAck(int type) {
    this._byte = null;
    buildPacket(type);
  }
  
  private void buildPacket(int type) {
    writeC(64);
    writeC(type);
    if (type == 10) {
      writeC(2);
      writeC(0);
      writeC(0);
      writeC(0);
      writeC(8);
      writeC(0);
    } else {
      writeD(0);
      writeH(0);
    } 
  }
  
  public byte[] getContent() {
    if (this._byte == null)
      this._byte = getBytes(); 
    return this._byte;
  }
  
  public String getType() {
    return getClass().getSimpleName();
  }
}
